//
//  SuveryTableViewCell.swift
//  BellManage
//
//  Created by Bestsch on 16/4/15.
//  Copyright © 2016年 wsl. All rights reserved.
//

import UIKit

class SuveryTableViewCell: UITableViewCell {

    var bgView,content: UIView!
    var timeLabel,contentLabel,sender: UILabel!
    
    override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
        super.init(style: UITableViewCellStyle.default, reuseIdentifier: reuseIdentifier)
        
        setUp()
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    func setUp() {
        
        bgView = UIView.init(frame: CGRect(x: 10, y: 10, width: screenW - 20, height: 110))
        bgView.backgroundColor = UIColor.init(hexString: "f6f6f6", alpha: 1)
        bgView.layer.cornerRadius = 4;
        bgView.layer.shadowOffset = CGSize(width: 0, height: 1);  // 设置阴影的偏移量
        bgView.layer.shadowRadius = 2.0;  // 设置阴影的半径
        bgView.layer.shadowColor = UIColor.lightGray.cgColor; // 设置阴影的颜色为黑色
        bgView.layer.shadowOpacity = 0.8; // 设置阴影的不透明度
        
        timeLabel = UILabel.init(frame: CGRect(x: 20, y: 10, width: screenW - 40, height: 30))
        timeLabel.textColor = UIColor.darkGray
        timeLabel.font = UIFont.boldSystemFont(ofSize: 14)
        
        content = UIView.init(frame: CGRect(x: 10, y: timeLabel.frame.maxY, width: screenW - 20, height: 50))
        content.backgroundColor = UIColor.white
        
        contentLabel = UILabel.init(frame: CGRect(x: 20, y: timeLabel.frame.maxY, width: screenW - 40, height: 50))
        contentLabel.font = UIFont.systemFont(ofSize: 14)
        contentLabel.textColor = textlight
        
        sender = UILabel.init(frame: CGRect(x: 20, y: content.frame.maxY, width: screenW-40, height: 30))
        sender.font = UIFont.systemFont(ofSize: 14)
        sender.textColor = textlight
        
        self.contentView.addSubview(bgView)
        self.contentView.addSubview(timeLabel)
        self.contentView.addSubview(content)
        self.contentView.addSubview(contentLabel)
        self.contentView.addSubview(sender)
        
    }
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }

}
